function getRequestUrl(uri) {
    if(typeof (localStorage.oid)=="undefined"){
        localStorage.oid="";
    }
	return localStorage.cpurl + uri + localStorage.oid;

}

function dealCPErrorResponse(err) {
    if (typeof(err.responseJSON.error_code) != "undefined" && err.responseJSON.error_code != 0) {
        if (typeof(err.responseJSON.error_msg) != "undefined") {
            /**
             * 说明服务端报错了，提示该内容 
             */
            //console.log(err.responseJSON.error_code);
            alert(err.responseJSON.error_msg);


        } else {
            alert("网络异常，请您稍后重试");
        }
    } else {
    	alert("网络异常，请您稍后重试");
    }
}
function gstime(time) {
    var strs="";
    var date = new Date(time*1000);
    var Y = date.getFullYear() + '-';
    var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
    var D = date.getDate() + ' ';
    var h = date.getHours()<10? '0'+date.getHours()+':':date.getHours()+':';
    var m = date.getMinutes()<10? '0'+date.getMinutes():date.getMinutes();
    strs =Y+M+D+h+m;
    return strs
}